Integrand size = 33, antiderivative size = 172 \[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{(a+a \cos (c+d x))^2} \, dx=-\frac {(5 A+2 C) \text {arctanh}(\sin (c+d x))}{a^2 d}+\frac {(12 A+5 C) \tan (c+d x)}{a^2 d}-\frac {(5 A+2 C) \sec (c+d x) \tan (c+d x)}{a^2 d}-\frac {2 (5 A+2 C) \sec ^2(c+d x) \tan (c+d x)}{3 a^2 d (1+\cos (c+d x))}-\frac {(A+C) \sec ^2(c+d x) \tan (c+d x)}{3 d (a+a \cos (c+d x))^2}+\frac {(12 A+5 C) \tan ^3(c+d x)}{3 a^2 d} \]
-(5*A+2*C)*arctanh(sin(d*x+c))/a^2/d+(12*A+5*C)*tan(d*x+c)/a^2/d-(5*A+2*C) *sec(d*x+c)*tan(d*x+c)/a^2/d-2/3*(5*A+2*C)*sec(d*x+c)^2*tan(d*x+c)/a^2/d/( 1+cos(d*x+c))-1/3*(A+C)*sec(d*x+c)^2*tan(d*x+c)/d/(a+a*cos(d*x+c))^2+1/3*( 12*A+5*C)*tan(d*x+c)^3/a^2/d
Leaf count is larger than twice the leaf count of optimal. \(594\) vs. \(2(172)=344\).
Time = 4.11 (sec) , antiderivative size = 594, normalized size of antiderivative = 3.45 \[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{(a+a \cos (c+d x))^2} \, dx=\frac {192 (5 A+2 C) \cos ^4\left (\frac {1}{2} (c+d x)\right ) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+\cos \left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {c}{2}\right ) \sec (c) \sec ^3(c+d x) \left (-3 (A+8 C) \sin \left (\frac {d x}{2}\right )+(155 A+66 C) \sin \left (\frac {3 d x}{2}\right )-153 A \sin \left (c-\frac {d x}{2}\right )-60 C \sin \left (c-\frac {d x}{2}\right )+21 A \sin \left (c+\frac {d x}{2}\right )+24 C \sin \left (c+\frac {d x}{2}\right )-135 A \sin \left (2 c+\frac {d x}{2}\right )-60 C \sin \left (2 c+\frac {d x}{2}\right )+25 A \sin \left (c+\frac {3 d x}{2}\right )-4 C \sin \left (c+\frac {3 d x}{2}\right )+45 A \sin \left (2 c+\frac {3 d x}{2}\right )+36 C \sin \left (2 c+\frac {3 d x}{2}\right )-85 A \sin \left (3 c+\frac {3 d x}{2}\right )-34 C \sin \left (3 c+\frac {3 d x}{2}\right )+99 A \sin \left (c+\frac {5 d x}{2}\right )+42 C \sin \left (c+\frac {5 d x}{2}\right )+21 A \sin \left (2 c+\frac {5 d x}{2}\right )+33 A \sin \left (3 c+\frac {5 d x}{2}\right )+24 C \sin \left (3 c+\frac {5 d x}{2}\right )-45 A \sin \left (4 c+\frac {5 d x}{2}\right )-18 C \sin \left (4 c+\frac {5 d x}{2}\right )+57 A \sin \left (2 c+\frac {7 d x}{2}\right )+24 C \sin \left (2 c+\frac {7 d x}{2}\right )+18 A \sin \left (3 c+\frac {7 d x}{2}\right )+3 C \sin \left (3 c+\frac {7 d x}{2}\right )+24 A \sin \left (4 c+\frac {7 d x}{2}\right )+15 C \sin \left (4 c+\frac {7 d x}{2}\right )-15 A \sin \left (5 c+\frac {7 d x}{2}\right )-6 C \sin \left (5 c+\frac {7 d x}{2}\right )+24 A \sin \left (3 c+\frac {9 d x}{2}\right )+10 C \sin \left (3 c+\frac {9 d x}{2}\right )+11 A \sin \left (4 c+\frac {9 d x}{2}\right )+3 C \sin \left (4 c+\frac {9 d x}{2}\right )+13 A \sin \left (5 c+\frac {9 d x}{2}\right )+7 C \sin \left (5 c+\frac {9 d x}{2}\right )\right )}{48 a^2 d (1+\cos (c+d x))^2} \]
(192*(5*A + 2*C)*Cos[(c + d*x)/2]^4*(Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/ 2]] - Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]]) + Cos[(c + d*x)/2]*Sec[c/2 ]*Sec[c]*Sec[c + d*x]^3*(-3*(A + 8*C)*Sin[(d*x)/2] + (155*A + 66*C)*Sin[(3 *d*x)/2] - 153*A*Sin[c - (d*x)/2] - 60*C*Sin[c - (d*x)/2] + 21*A*Sin[c + ( d*x)/2] + 24*C*Sin[c + (d*x)/2] - 135*A*Sin[2*c + (d*x)/2] - 60*C*Sin[2*c + (d*x)/2] + 25*A*Sin[c + (3*d*x)/2] - 4*C*Sin[c + (3*d*x)/2] + 45*A*Sin[2 *c + (3*d*x)/2] + 36*C*Sin[2*c + (3*d*x)/2] - 85*A*Sin[3*c + (3*d*x)/2] - 34*C*Sin[3*c + (3*d*x)/2] + 99*A*Sin[c + (5*d*x)/2] + 42*C*Sin[c + (5*d*x) /2] + 21*A*Sin[2*c + (5*d*x)/2] + 33*A*Sin[3*c + (5*d*x)/2] + 24*C*Sin[3*c + (5*d*x)/2] - 45*A*Sin[4*c + (5*d*x)/2] - 18*C*Sin[4*c + (5*d*x)/2] + 57 *A*Sin[2*c + (7*d*x)/2] + 24*C*Sin[2*c + (7*d*x)/2] + 18*A*Sin[3*c + (7*d* x)/2] + 3*C*Sin[3*c + (7*d*x)/2] + 24*A*Sin[4*c + (7*d*x)/2] + 15*C*Sin[4* c + (7*d*x)/2] - 15*A*Sin[5*c + (7*d*x)/2] - 6*C*Sin[5*c + (7*d*x)/2] + 24 *A*Sin[3*c + (9*d*x)/2] + 10*C*Sin[3*c + (9*d*x)/2] + 11*A*Sin[4*c + (9*d* x)/2] + 3*C*Sin[4*c + (9*d*x)/2] + 13*A*Sin[5*c + (9*d*x)/2] + 7*C*Sin[5*c + (9*d*x)/2]))/(48*a^2*d*(1 + Cos[c + d*x])^2)
Time = 1.05 (sec) , antiderivative size = 169, normalized size of antiderivative = 0.98, number of steps used = 14, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.394, Rules used = {3042, 3521, 3042, 3457, 27, 3042, 3227, 3042, 4254, 2009, 4255, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec ^4(c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a \cos (c+d x)+a)^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+C \sin \left (c+d x+\frac {\pi }{2}\right )^2}{\sin \left (c+d x+\frac {\pi }{2}\right )^4 \left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right )^2}dx\) |
\(\Big \downarrow \) 3521 |
\(\displaystyle \frac {\int \frac {(3 a (2 A+C)-a (4 A+C) \cos (c+d x)) \sec ^4(c+d x)}{\cos (c+d x) a+a}dx}{3 a^2}-\frac {(A+C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {3 a (2 A+C)-a (4 A+C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^4 \left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )}dx}{3 a^2}-\frac {(A+C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3457 |
\(\displaystyle \frac {\frac {\int 3 \left (a^2 (12 A+5 C)-2 a^2 (5 A+2 C) \cos (c+d x)\right ) \sec ^4(c+d x)dx}{a^2}-\frac {2 (5 A+2 C) \tan (c+d x) \sec ^2(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(A+C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {3 \int \left (a^2 (12 A+5 C)-2 a^2 (5 A+2 C) \cos (c+d x)\right ) \sec ^4(c+d x)dx}{a^2}-\frac {2 (5 A+2 C) \tan (c+d x) \sec ^2(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(A+C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {3 \int \frac {a^2 (12 A+5 C)-2 a^2 (5 A+2 C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^4}dx}{a^2}-\frac {2 (5 A+2 C) \tan (c+d x) \sec ^2(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(A+C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {\frac {3 \left (a^2 (12 A+5 C) \int \sec ^4(c+d x)dx-2 a^2 (5 A+2 C) \int \sec ^3(c+d x)dx\right )}{a^2}-\frac {2 (5 A+2 C) \tan (c+d x) \sec ^2(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(A+C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {3 \left (a^2 (12 A+5 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^4dx-2 a^2 (5 A+2 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx\right )}{a^2}-\frac {2 (5 A+2 C) \tan (c+d x) \sec ^2(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(A+C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {\frac {3 \left (-\frac {a^2 (12 A+5 C) \int \left (\tan ^2(c+d x)+1\right )d(-\tan (c+d x))}{d}-2 a^2 (5 A+2 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx\right )}{a^2}-\frac {2 (5 A+2 C) \tan (c+d x) \sec ^2(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(A+C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {3 \left (-2 a^2 (5 A+2 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx-\frac {a^2 (12 A+5 C) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}\right )}{a^2}-\frac {2 (5 A+2 C) \tan (c+d x) \sec ^2(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(A+C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 4255 |
\(\displaystyle \frac {\frac {3 \left (-2 a^2 (5 A+2 C) \left (\frac {1}{2} \int \sec (c+d x)dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {a^2 (12 A+5 C) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}\right )}{a^2}-\frac {2 (5 A+2 C) \tan (c+d x) \sec ^2(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(A+C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {3 \left (-2 a^2 (5 A+2 C) \left (\frac {1}{2} \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {a^2 (12 A+5 C) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}\right )}{a^2}-\frac {2 (5 A+2 C) \tan (c+d x) \sec ^2(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(A+C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {\frac {3 \left (-2 a^2 (5 A+2 C) \left (\frac {\text {arctanh}(\sin (c+d x))}{2 d}+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {a^2 (12 A+5 C) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}\right )}{a^2}-\frac {2 (5 A+2 C) \tan (c+d x) \sec ^2(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(A+C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
-1/3*((A + C)*Sec[c + d*x]^2*Tan[c + d*x])/(d*(a + a*Cos[c + d*x])^2) + (( -2*(5*A + 2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(d*(1 + Cos[c + d*x])) + (3*(- 2*a^2*(5*A + 2*C)*(ArcTanh[Sin[c + d*x]]/(2*d) + (Sec[c + d*x]*Tan[c + d*x ])/(2*d)) - (a^2*(12*A + 5*C)*(-Tan[c + d*x] - Tan[c + d*x]^3/3))/d))/a^2) /(3*a^2)
3.1.55.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[b*(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^( n + 1)/(a*f*(2*m + 1)*(b*c - a*d))), x] + Simp[1/(a*(2*m + 1)*(b*c - a*d)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[B*(a*c*m + b *d*(n + 1)) + A*(b*c*(m + 1) - a*d*(2*m + n + 2)) + d*(A*b - a*B)*(m + n + 2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ [b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)] && !GtQ[n, 0] && IntegerQ[2*m] && (IntegerQ[2*n] || EqQ[c, 0])
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[a*(A + C)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^(n + 1)/(f*(b*c - a*d)*(2*m + 1))), x] + Simp[1/(b*(b*c - a*d)*(2*m + 1)) I nt[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[A*(a*c*(m + 1) - b*d*(2*m + n + 2)) - C*(a*c*m + b*d*(n + 1)) + (a*A*d*(m + n + 2) + C*(b* c*(2*m + 1) - a*d*(m - n - 1)))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, C, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)]
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[2*n]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 2.64 (sec) , antiderivative size = 196, normalized size of antiderivative = 1.14
method | result | size |
parallelrisch | \(\frac {90 \left (\frac {\cos \left (3 d x +3 c \right )}{3}+\cos \left (d x +c \right )\right ) \left (A +\frac {2 C}{5}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-90 \left (\frac {\cos \left (3 d x +3 c \right )}{3}+\cos \left (d x +c \right )\right ) \left (A +\frac {2 C}{5}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+12 \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\left (\frac {11 A}{4}+\frac {7 C}{6}\right ) \cos \left (3 d x +3 c \right )+\left (5 A +\frac {13 C}{6}\right ) \cos \left (2 d x +2 c \right )+\left (A +\frac {5 C}{12}\right ) \cos \left (4 d x +4 c \right )+\left (\frac {95 A}{12}+\frac {7 C}{2}\right ) \cos \left (d x +c \right )+\frac {13 A}{3}+\frac {7 C}{4}\right )}{6 d \,a^{2} \left (\cos \left (3 d x +3 c \right )+3 \cos \left (d x +c \right )\right )}\) | \(196\) |
derivativedivides | \(\frac {\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A}{3}+\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{3}+9 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C -\frac {10 A +2 C}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\left (10 A +4 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {2 A}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {3 A}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\left (-10 A -4 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {10 A +2 C}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-\frac {2 A}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {3 A}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}}{2 d \,a^{2}}\) | \(210\) |
default | \(\frac {\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A}{3}+\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{3}+9 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C -\frac {10 A +2 C}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\left (10 A +4 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {2 A}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {3 A}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\left (-10 A -4 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {10 A +2 C}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-\frac {2 A}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {3 A}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}}{2 d \,a^{2}}\) | \(210\) |
norman | \(\frac {\frac {\left (A +C \right ) \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a d}-\frac {3 \left (7 A +3 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}+\frac {\left (13 A +7 C \right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}+\frac {\left (17 A +7 C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}-\frac {2 \left (23 A +7 C \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}-\frac {\left (89 A +29 C \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a d}+\frac {\left (119 A +55 C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3} a}+\frac {\left (5 A +2 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a^{2} d}-\frac {\left (5 A +2 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a^{2} d}\) | \(266\) |
risch | \(\frac {2 i \left (15 A \,{\mathrm e}^{8 i \left (d x +c \right )}+6 C \,{\mathrm e}^{8 i \left (d x +c \right )}+45 A \,{\mathrm e}^{7 i \left (d x +c \right )}+18 C \,{\mathrm e}^{7 i \left (d x +c \right )}+85 A \,{\mathrm e}^{6 i \left (d x +c \right )}+34 C \,{\mathrm e}^{6 i \left (d x +c \right )}+135 A \,{\mathrm e}^{5 i \left (d x +c \right )}+60 C \,{\mathrm e}^{5 i \left (d x +c \right )}+153 A \,{\mathrm e}^{4 i \left (d x +c \right )}+60 C \,{\mathrm e}^{4 i \left (d x +c \right )}+155 A \,{\mathrm e}^{3 i \left (d x +c \right )}+66 C \,{\mathrm e}^{3 i \left (d x +c \right )}+99 A \,{\mathrm e}^{2 i \left (d x +c \right )}+42 C \,{\mathrm e}^{2 i \left (d x +c \right )}+57 A \,{\mathrm e}^{i \left (d x +c \right )}+24 C \,{\mathrm e}^{i \left (d x +c \right )}+24 A +10 C \right )}{3 d \,a^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{3}}-\frac {5 A \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{a^{2} d}-\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{a^{2} d}+\frac {5 A \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{a^{2} d}+\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{a^{2} d}\) | \(324\) |
1/6*(90*(1/3*cos(3*d*x+3*c)+cos(d*x+c))*(A+2/5*C)*ln(tan(1/2*d*x+1/2*c)-1) -90*(1/3*cos(3*d*x+3*c)+cos(d*x+c))*(A+2/5*C)*ln(tan(1/2*d*x+1/2*c)+1)+12* sec(1/2*d*x+1/2*c)^2*tan(1/2*d*x+1/2*c)*((11/4*A+7/6*C)*cos(3*d*x+3*c)+(5* A+13/6*C)*cos(2*d*x+2*c)+(A+5/12*C)*cos(4*d*x+4*c)+(95/12*A+7/2*C)*cos(d*x +c)+13/3*A+7/4*C))/d/a^2/(cos(3*d*x+3*c)+3*cos(d*x+c))
Time = 0.29 (sec) , antiderivative size = 237, normalized size of antiderivative = 1.38 \[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{(a+a \cos (c+d x))^2} \, dx=-\frac {3 \, {\left ({\left (5 \, A + 2 \, C\right )} \cos \left (d x + c\right )^{5} + 2 \, {\left (5 \, A + 2 \, C\right )} \cos \left (d x + c\right )^{4} + {\left (5 \, A + 2 \, C\right )} \cos \left (d x + c\right )^{3}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left ({\left (5 \, A + 2 \, C\right )} \cos \left (d x + c\right )^{5} + 2 \, {\left (5 \, A + 2 \, C\right )} \cos \left (d x + c\right )^{4} + {\left (5 \, A + 2 \, C\right )} \cos \left (d x + c\right )^{3}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (2 \, {\left (12 \, A + 5 \, C\right )} \cos \left (d x + c\right )^{4} + {\left (33 \, A + 14 \, C\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (2 \, A + C\right )} \cos \left (d x + c\right )^{2} - A \cos \left (d x + c\right ) + A\right )} \sin \left (d x + c\right )}{6 \, {\left (a^{2} d \cos \left (d x + c\right )^{5} + 2 \, a^{2} d \cos \left (d x + c\right )^{4} + a^{2} d \cos \left (d x + c\right )^{3}\right )}} \]
-1/6*(3*((5*A + 2*C)*cos(d*x + c)^5 + 2*(5*A + 2*C)*cos(d*x + c)^4 + (5*A + 2*C)*cos(d*x + c)^3)*log(sin(d*x + c) + 1) - 3*((5*A + 2*C)*cos(d*x + c) ^5 + 2*(5*A + 2*C)*cos(d*x + c)^4 + (5*A + 2*C)*cos(d*x + c)^3)*log(-sin(d *x + c) + 1) - 2*(2*(12*A + 5*C)*cos(d*x + c)^4 + (33*A + 14*C)*cos(d*x + c)^3 + 3*(2*A + C)*cos(d*x + c)^2 - A*cos(d*x + c) + A)*sin(d*x + c))/(a^2 *d*cos(d*x + c)^5 + 2*a^2*d*cos(d*x + c)^4 + a^2*d*cos(d*x + c)^3)
\[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{(a+a \cos (c+d x))^2} \, dx=\frac {\int \frac {A \sec ^{4}{\left (c + d x \right )}}{\cos ^{2}{\left (c + d x \right )} + 2 \cos {\left (c + d x \right )} + 1}\, dx + \int \frac {C \cos ^{2}{\left (c + d x \right )} \sec ^{4}{\left (c + d x \right )}}{\cos ^{2}{\left (c + d x \right )} + 2 \cos {\left (c + d x \right )} + 1}\, dx}{a^{2}} \]
(Integral(A*sec(c + d*x)**4/(cos(c + d*x)**2 + 2*cos(c + d*x) + 1), x) + I ntegral(C*cos(c + d*x)**2*sec(c + d*x)**4/(cos(c + d*x)**2 + 2*cos(c + d*x ) + 1), x))/a**2
Leaf count of result is larger than twice the leaf count of optimal. 379 vs. \(2 (166) = 332\).
Time = 0.24 (sec) , antiderivative size = 379, normalized size of antiderivative = 2.20 \[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{(a+a \cos (c+d x))^2} \, dx=\frac {A {\left (\frac {4 \, {\left (\frac {9 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {20 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {15 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}\right )}}{a^{2} - \frac {3 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {3 \, a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {a^{2} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}} + \frac {\frac {27 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {30 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{2}} + \frac {30 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{2}}\right )} + C {\left (\frac {\frac {15 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {12 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{2}} + \frac {12 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{2}} + \frac {12 \, \sin \left (d x + c\right )}{{\left (a^{2} - \frac {a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}}\right )}}{6 \, d} \]
1/6*(A*(4*(9*sin(d*x + c)/(cos(d*x + c) + 1) - 20*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 15*sin(d*x + c)^5/(cos(d*x + c) + 1)^5)/(a^2 - 3*a^2*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 3*a^2*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 - a^2*sin(d*x + c)^6/(cos(d*x + c) + 1)^6) + (27*sin(d*x + c)/(cos(d*x + c) + 1) + sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/a^2 - 30*log(sin(d*x + c)/(co s(d*x + c) + 1) + 1)/a^2 + 30*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a^2 ) + C*((15*sin(d*x + c)/(cos(d*x + c) + 1) + sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/a^2 - 12*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a^2 + 12*log(sin (d*x + c)/(cos(d*x + c) + 1) - 1)/a^2 + 12*sin(d*x + c)/((a^2 - a^2*sin(d* x + c)^2/(cos(d*x + c) + 1)^2)*(cos(d*x + c) + 1))))/d
Time = 0.29 (sec) , antiderivative size = 225, normalized size of antiderivative = 1.31 \[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{(a+a \cos (c+d x))^2} \, dx=-\frac {\frac {6 \, {\left (5 \, A + 2 \, C\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a^{2}} - \frac {6 \, {\left (5 \, A + 2 \, C\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a^{2}} + \frac {4 \, {\left (15 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 20 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 6 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 9 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{3} a^{2}} - \frac {A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + C a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 27 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 15 \, C a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{6}}}{6 \, d} \]
-1/6*(6*(5*A + 2*C)*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a^2 - 6*(5*A + 2*C) *log(abs(tan(1/2*d*x + 1/2*c) - 1))/a^2 + 4*(15*A*tan(1/2*d*x + 1/2*c)^5 + 3*C*tan(1/2*d*x + 1/2*c)^5 - 20*A*tan(1/2*d*x + 1/2*c)^3 - 6*C*tan(1/2*d* x + 1/2*c)^3 + 9*A*tan(1/2*d*x + 1/2*c) + 3*C*tan(1/2*d*x + 1/2*c))/((tan( 1/2*d*x + 1/2*c)^2 - 1)^3*a^2) - (A*a^4*tan(1/2*d*x + 1/2*c)^3 + C*a^4*tan (1/2*d*x + 1/2*c)^3 + 27*A*a^4*tan(1/2*d*x + 1/2*c) + 15*C*a^4*tan(1/2*d*x + 1/2*c))/a^6)/d
Time = 1.14 (sec) , antiderivative size = 197, normalized size of antiderivative = 1.15 \[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{(a+a \cos (c+d x))^2} \, dx=\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {2\,\left (A+C\right )}{a^2}+\frac {5\,A+C}{2\,a^2}\right )}{d}-\frac {\left (10\,A+2\,C\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-\frac {40\,A}{3}-4\,C\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (6\,A+2\,C\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-3\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-a^2\right )}-\frac {2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (5\,A+2\,C\right )}{a^2\,d}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (A+C\right )}{6\,a^2\,d} \]
(tan(c/2 + (d*x)/2)*((2*(A + C))/a^2 + (5*A + C)/(2*a^2)))/d - (tan(c/2 + (d*x)/2)^5*(10*A + 2*C) - tan(c/2 + (d*x)/2)^3*((40*A)/3 + 4*C) + tan(c/2 + (d*x)/2)*(6*A + 2*C))/(d*(3*a^2*tan(c/2 + (d*x)/2)^2 - 3*a^2*tan(c/2 + ( d*x)/2)^4 + a^2*tan(c/2 + (d*x)/2)^6 - a^2)) - (2*atanh(tan(c/2 + (d*x)/2) )*(5*A + 2*C))/(a^2*d) + (tan(c/2 + (d*x)/2)^3*(A + C))/(6*a^2*d)